package com.ocm.core.service;

import java.util.List;

import com.ocm.core.domain.Permission;
import com.ocm.core.domain.Security;
import com.ocm.core.dto.GroupDto;
import com.ocm.core.dto.UserInfoDto;
import com.opm.security.core.service.UserService;

public interface SecurityService extends UserService {

   void saveGroup(GroupDto group);

   Long addUser(UserInfoDto userInfoDto);

   List<GroupDto> findGroups();

   List<GroupDto> findGroups(Long[] groupIds);

   List<UserInfoDto> findAll(Long[] secIds);

   GroupDto findByGroupId(long groupId);

   GroupDto findByGroupname(String groupname);

   List<GroupDto> findByGroupnames(String[] groupnames);

   UserInfoDto findUserInfoByGroupname(String groupname);

   UserInfoDto findUserInfoByUsername(String username);

   UserInfoDto getCurrentUsername();

   UserInfoDto findByUserId(long userId);

   UserInfoDto findById(long id);

   boolean hasExistGroupName(String groupName);

   boolean hasExistUserName(String userName);

   List<UserInfoDto> findAllUser();

   List<GroupDto> searchByGroupName(String groupName);

   List<UserInfoDto> searchByUserName(String userName);
   
   List<UserInfoDto> searchByName(String userName);

   boolean hasPermission (Security security, Permission permission);

   void verifyPermission (Security security, Permission permission);
}
